package com.ydj.controller;

import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

import lombok.extern.slf4j.Slf4j;

@Component
@Slf4j
public class PongKafkaListener {

    @KafkaListener(groupId = "${spring.kafka.consumer.group-id:mygroup}", topics = "${spring.kafka.topic:pingpong}")
    public void listen(String message) {
        log.info("收到消息: " + message);
    }
}
